<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/4/3
 * Time: 16:12
 */
namespace app\admin\controller;

use think\Controller;
use think\Request;

class Base extends Controller
{
    /**
     * 正确状态码
     * @var int
     */
    protected $t_code;

    /**
     * 错误状态码
     * @var int
     */
    protected $f_code;


    public function _initialize($str=null)
    {
        header("Access-Control-Allow-Origin: *");
//        parent::_initialize(); // TODO: Change the autogenerated stub
        $this->t_code=config('t_code');
        $this->f_code=config('f_code');
//        if($str != 'login'){
//            $res=session($_SERVER['REMOTE_ADDR']);
//            if(empty($res)){
//                $this->redirect('http://www.baidu.com');
//            }
//        }
    }




}
